import { createStore } from 'redux'

const initState = {name:'张三'}
const reducer = (state = initState, action) => {
  if(action.type === 'CHANGE_NAME') {
    return {
      ...state,
      name: '李四'
    }
  }
  return state
}

const store = createStore(reducer)

export default store